/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package testing;

import com.zelic.znn.core.*;
import com.zelic.znn.network.*;
/**
 *
 * @author Zelic
 */
public class NeuralTest {
    public static void main(String[] args){
        BackPropagationNetwork network = new BackPropagationNetwork();
        network.addLayer(2, 3, 0.1);
        network.addLayer(3, 1, 0.1);
        TrainingSet trainingSet = new TrainingSet(2, 1);
        trainingSet.addTrainingExample(new double[]{1,1},new double[]{0});
        trainingSet.addTrainingExample(new double[]{0,1},new double[]{1});
        trainingSet.addTrainingExample(new double[]{1,0},new double[]{1});
        trainingSet.addTrainingExample(new double[]{0,0},new double[]{0});
        network.trainWithLimitedError(0.0001, trainingSet);
        
    }
}
